-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wallet history details #1054
Wallet history details #1054
Conversation
I wonder why lint-flutter and ln-dlc-ode-tests is failing on this 🤔 I didn't touch anything in |
Possibly related: #982. May or may not be worth a follow-up PR. |
I like the proposal of expandable tiles 👍. Did you also try how it would look with a details screen? In terms of a pattern it would probably allow us to show more complex data as well. |
In terms of information to display, here are some suggestions: On-chain transaction
Off-chain paymentThis would be for regular Lightning payments. At some point it would be nice to differentiate the JIT channel opening payment, but I'm not sure that's possible yet.
TradeAt the moment we can only open and close, but I think we should be talking about trades anyway.
JIT channel opening fee
Order-matching fee
These are only ideas, based on the original ticket and what you mentioned already. |
Hmmm, I don't think so. I've been able to merge things since that merged. |
You mean in terms of opening a separate screen when you click on the tile? I haven't done that yet since there isn't enough data to show in the model. Maybe a "show more details" button could be added, though. |
@luckysori thanks for all the suggestions! I'll go over a few:
Currently not represented in the model. Should this be done in a followup rather perhaps?
I think we only show failed and pending in the view currently - this is already shown in the header, so is it worth to show it again?
Also not yet modelled
A link in what sense? Where would it take you? In general, I like these ideas! I do think it might make more sense to postpone them to a followup PR, though, since they require significant work on the modelling in Flutter. My proposal is for this PR to just introduce the UI elements and display all info we currently model, and then open a followup to model and display the rest. The modelling could be slightly more complex than just adding fields, since we might want to split it out into different classes instead of having just one. I really wish we had Rust enums in Dart... |
I propose to go with a popup instead. I can design something simple in Figma first |
Sure, I can work on the modal UI "infrastructure" until then and pivot away from the expandible tiles? |
I've pushed my current changes to |
Sure, please go ahead. |
If we are going to use a dialogue, how do we communicate to the user that this is a clickable tile? There are some other places in the app like with the order screen which have hidden affordances like this. I.e, the user can do it, but it is not communicated by the UI. It just looks like an immutable tile to the user. With the dropdown arrow, it is clear that it can be expanded, but I'm not sure what we should do for a dialogue |
I don't know about you, but I usually click everywhere in an app if I want to see more details :) I've added a quick video to the ticket and the figma link: #872 |
Don't worry if it's not modeled. It was just a thought.
Good point. It's probably better to only display it one way.
I think you are right! We can treat it as a regular payment until we do model it properly. I think there's an open issue for that.
Sorry for the poor word choice. By "link" I meant that the order ID would be displayed in the detailed view.
👍 Yep, it makes sense to not modify the model with this PR. We can consider what I wrote when we have a chance to expand the model. |
As do I, but I know that many users don't 😅 Anecdote, I once had someone complain to me that the notification button on our university's online platform was "useless" because it didn't tell you where the notifications came from (it would just say "Notification @ [time]". In actual fact, if you clicked on the notification line it would expand... Hence, it might be better design to add some kind of indication that it can be clicked on. Maybe there's a standard in material design for that |
ab4e65e
to
834a2ea
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job, I think this is nice!
@@ -98,10 +98,13 @@ class WalletHistoryItem extends StatelessWidget { | |||
} | |||
}(); | |||
|
|||
var amountFormatter = NumberFormat.compact(locale: "en_IN"); | |||
var amountFormatter = NumberFormat.compact(locale: "en_UK"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❓Is the locale choice important and/or deliberate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, this is a small chore fix which I could extract. It's just weird that we use en_IN
, and since Indian English has got lakh and other ways to abbreviate numbers I thought it could be slightly dangerous too
|
||
return Card( | ||
child: ListTile( | ||
onTap: () async { | ||
await showDialog(context: context, builder: (ctx) => showItemDetails(title, ctx)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❓What does showDialog
do and where does it come from? I'm curious because I think our code is just showItemDetails
, so this must be some kind of pattern.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a flutter function to show the dialogue as a modal: https://api.flutter.dev/flutter/material/showDialog.html
834a2ea
to
b7e13e8
Compare
Accidental restoration 😅 |
I'm opening this as a draft since I want a second opinion on the type of info to show in the expanded view before I put more work into styling it.
In list:
When tapped:
Possibilities:
Fixes #1011, and is a start on #872